use crate::Error;

pub struct PngIcon {
    pub data: Vec<u8>,
    pub width: u32,
    pub height: u32,
}

impl PngIcon {
    #[allow(dead_code)]
    pub fn decode<P: AsRef<std::path::Path>>(path: P) -> Result<Self, Error> {
        let bytes = std::fs::read(&path).map_err(|_| Error::NotFound(path.as_ref().to_owned()))?;
        Self::decode_bytes(&bytes)
    }

    pub fn decode_bytes(bytes: &[u8]) -> Result<Self, Error> {
        let mut decoder = png::Decoder::new(bytes);
        decoder.set_transformations(png::Transformations::STRIP_16 | png::Transformations::EXPAND);

        let mut reader = decoder.read_info().map_err(|_| Error::PngDecode)?;
        let mut data = vec![0; reader.output_buffer_size()];
        let info = reader.next_frame(&mut data).map_err(|_| Error::PngDecode)?;

        if info.width == 0 || info.height == 0 {
            return Err(Error::PngDecode);
        }

        if info.color_type != png::ColorType::Rgba {
            return Err(Error::PngFormat);
        }

        Ok(Self {
            data,
            width: info.width,
            height: info.height,
        })
    }
}

/// IcoMoon icons.
#[macro_export]
macro_rules! icon {
    () => {};
    (HOME $(, $text:literal)?) => {
        concat!("\u{e900}", $($text)?)
    };
    (HOME2 $(, $text:literal)?) => {
        concat!("\u{e901}", $($text)?)
    };
    (HOME3 $(, $text:literal)?) => {
        concat!("\u{e902}", $($text)?)
    };
    (OFFICE $(, $text:literal)?) => {
        concat!("\u{e903}", $($text)?)
    };
    (NEWSPAPER $(, $text:literal)?) => {
        concat!("\u{e904}", $($text)?)
    };
    (PENCIL $(, $text:literal)?) => {
        concat!("\u{e905}", $($text)?)
    };
    (PENCIL2 $(, $text:literal)?) => {
        concat!("\u{e906}", $($text)?)
    };
    (QUILL $(, $text:literal)?) => {
        concat!("\u{e907}", $($text)?)
    };
    (PEN $(, $text:literal)?) => {
        concat!("\u{e908}", $($text)?)
    };
    (BLOG $(, $text:literal)?) => {
        concat!("\u{e909}", $($text)?)
    };
    (EYEDROPPER $(, $text:literal)?) => {
        concat!("\u{e90a}", $($text)?)
    };
    (DROPLET $(, $text:literal)?) => {
        concat!("\u{e90b}", $($text)?)
    };
    (PAINT_FORMAT $(, $text:literal)?) => {
        concat!("\u{e90c}", $($text)?)
    };
    (IMAGE $(, $text:literal)?) => {
        concat!("\u{e90d}", $($text)?)
    };
    (IMAGES $(, $text:literal)?) => {
        concat!("\u{e90e}", $($text)?)
    };
    (CAMERA $(, $text:literal)?) => {
        concat!("\u{e90f}", $($text)?)
    };
    (HEADPHONES $(, $text:literal)?) => {
        concat!("\u{e910}", $($text)?)
    };
    (MUSIC $(, $text:literal)?) => {
        concat!("\u{e911}", $($text)?)
    };
    (PLAY $(, $text:literal)?) => {
        concat!("\u{e912}", $($text)?)
    };
    (FILM $(, $text:literal)?) => {
        concat!("\u{e913}", $($text)?)
    };
    (VIDEO_CAMERA $(, $text:literal)?) => {
        concat!("\u{e914}", $($text)?)
    };
    (DICE $(, $text:literal)?) => {
        concat!("\u{e915}", $($text)?)
    };
    (PACMAN $(, $text:literal)?) => {
        concat!("\u{e916}", $($text)?)
    };
    (SPADES $(, $text:literal)?) => {
        concat!("\u{e917}", $($text)?)
    };
    (CLUBS $(, $text:literal)?) => {
        concat!("\u{e918}", $($text)?)
    };
    (DIAMONDS $(, $text:literal)?) => {
        concat!("\u{e919}", $($text)?)
    };
    (BULLHORN $(, $text:literal)?) => {
        concat!("\u{e91a}", $($text)?)
    };
    (CONNECTION $(, $text:literal)?) => {
        concat!("\u{e91b}", $($text)?)
    };
    (PODCAST $(, $text:literal)?) => {
        concat!("\u{e91c}", $($text)?)
    };
    (FEED $(, $text:literal)?) => {
        concat!("\u{e91d}", $($text)?)
    };
    (MIC $(, $text:literal)?) => {
        concat!("\u{e91e}", $($text)?)
    };
    (BOOK $(, $text:literal)?) => {
        concat!("\u{e91f}", $($text)?)
    };
    (BOOKS $(, $text:literal)?) => {
        concat!("\u{e920}", $($text)?)
    };
    (LIBRARY $(, $text:literal)?) => {
        concat!("\u{e921}", $($text)?)
    };
    (FILE_TEXT $(, $text:literal)?) => {
        concat!("\u{e922}", $($text)?)
    };
    (PROFILE $(, $text:literal)?) => {
        concat!("\u{e923}", $($text)?)
    };
    (FILE_EMPTY $(, $text:literal)?) => {
        concat!("\u{e924}", $($text)?)
    };
    (FILES_EMPTY $(, $text:literal)?) => {
        concat!("\u{e925}", $($text)?)
    };
    (FILE_TEXT2 $(, $text:literal)?) => {
        concat!("\u{e926}", $($text)?)
    };
    (FILE_PICTURE $(, $text:literal)?) => {
        concat!("\u{e927}", $($text)?)
    };
    (FILE_MUSIC $(, $text:literal)?) => {
        concat!("\u{e928}", $($text)?)
    };
    (FILE_PLAY $(, $text:literal)?) => {
        concat!("\u{e929}", $($text)?)
    };
    (FILE_VIDEO $(, $text:literal)?) => {
        concat!("\u{e92a}", $($text)?)
    };
    (FILE_ZIP $(, $text:literal)?) => {
        concat!("\u{e92b}", $($text)?)
    };
    (COPY $(, $text:literal)?) => {
        concat!("\u{e92c}", $($text)?)
    };
    (PASTE $(, $text:literal)?) => {
        concat!("\u{e92d}", $($text)?)
    };
    (STACK $(, $text:literal)?) => {
        concat!("\u{e92e}", $($text)?)
    };
    (FOLDER $(, $text:literal)?) => {
        concat!("\u{e92f}", $($text)?)
    };
    (FOLDER_OPEN $(, $text:literal)?) => {
        concat!("\u{e930}", $($text)?)
    };
    (FOLDER_PLUS $(, $text:literal)?) => {
        concat!("\u{e931}", $($text)?)
    };
    (FOLDER_MINUS $(, $text:literal)?) => {
        concat!("\u{e932}", $($text)?)
    };
    (FOLDER_DOWNLOAD $(, $text:literal)?) => {
        concat!("\u{e933}", $($text)?)
    };
    (FOLDER_UPLOAD $(, $text:literal)?) => {
        concat!("\u{e934}", $($text)?)
    };
    (PRICE_TAG $(, $text:literal)?) => {
        concat!("\u{e935}", $($text)?)
    };
    (PRICE_TAGS $(, $text:literal)?) => {
        concat!("\u{e936}", $($text)?)
    };
    (BARCODE $(, $text:literal)?) => {
        concat!("\u{e937}", $($text)?)
    };
    (QRCODE $(, $text:literal)?) => {
        concat!("\u{e938}", $($text)?)
    };
    (TICKET $(, $text:literal)?) => {
        concat!("\u{e939}", $($text)?)
    };
    (CART $(, $text:literal)?) => {
        concat!("\u{e93a}", $($text)?)
    };
    (COIN_DOLLAR $(, $text:literal)?) => {
        concat!("\u{e93b}", $($text)?)
    };
    (COIN_EURO $(, $text:literal)?) => {
        concat!("\u{e93c}", $($text)?)
    };
    (COIN_POUND $(, $text:literal)?) => {
        concat!("\u{e93d}", $($text)?)
    };
    (COIN_YEN $(, $text:literal)?) => {
        concat!("\u{e93e}", $($text)?)
    };
    (CREDIT_CARD $(, $text:literal)?) => {
        concat!("\u{e93f}", $($text)?)
    };
    (CALCULATOR $(, $text:literal)?) => {
        concat!("\u{e940}", $($text)?)
    };
    (LIFEBUOY $(, $text:literal)?) => {
        concat!("\u{e941}", $($text)?)
    };
    (PHONE $(, $text:literal)?) => {
        concat!("\u{e942}", $($text)?)
    };
    (PHONE_HANG_UP $(, $text:literal)?) => {
        concat!("\u{e943}", $($text)?)
    };
    (ADDRESS_BOOK $(, $text:literal)?) => {
        concat!("\u{e944}", $($text)?)
    };
    (ENVELOP $(, $text:literal)?) => {
        concat!("\u{e945}", $($text)?)
    };
    (PUSHPIN $(, $text:literal)?) => {
        concat!("\u{e946}", $($text)?)
    };
    (LOCATION $(, $text:literal)?) => {
        concat!("\u{e947}", $($text)?)
    };
    (LOCATION2 $(, $text:literal)?) => {
        concat!("\u{e948}", $($text)?)
    };
    (COMPASS $(, $text:literal)?) => {
        concat!("\u{e949}", $($text)?)
    };
    (COMPASS2 $(, $text:literal)?) => {
        concat!("\u{e94a}", $($text)?)
    };
    (MAP $(, $text:literal)?) => {
        concat!("\u{e94b}", $($text)?)
    };
    (MAP2 $(, $text:literal)?) => {
        concat!("\u{e94c}", $($text)?)
    };
    (HISTORY $(, $text:literal)?) => {
        concat!("\u{e94d}", $($text)?)
    };
    (CLOCK $(, $text:literal)?) => {
        concat!("\u{e94e}", $($text)?)
    };
    (CLOCK2 $(, $text:literal)?) => {
        concat!("\u{e94f}", $($text)?)
    };
    (ALARM $(, $text:literal)?) => {
        concat!("\u{e950}", $($text)?)
    };
    (BELL $(, $text:literal)?) => {
        concat!("\u{e951}", $($text)?)
    };
    (STOPWATCH $(, $text:literal)?) => {
        concat!("\u{e952}", $($text)?)
    };
    (CALENDAR $(, $text:literal)?) => {
        concat!("\u{e953}", $($text)?)
    };
    (PRINTER $(, $text:literal)?) => {
        concat!("\u{e954}", $($text)?)
    };
    (KEYBOARD $(, $text:literal)?) => {
        concat!("\u{e955}", $($text)?)
    };
    (DISPLAY $(, $text:literal)?) => {
        concat!("\u{e956}", $($text)?)
    };
    (LAPTOP $(, $text:literal)?) => {
        concat!("\u{e957}", $($text)?)
    };
    (MOBILE $(, $text:literal)?) => {
        concat!("\u{e958}", $($text)?)
    };
    (MOBILE2 $(, $text:literal)?) => {
        concat!("\u{e959}", $($text)?)
    };
    (TABLET $(, $text:literal)?) => {
        concat!("\u{e95a}", $($text)?)
    };
    (TV $(, $text:literal)?) => {
        concat!("\u{e95b}", $($text)?)
    };
    (DRAWER $(, $text:literal)?) => {
        concat!("\u{e95c}", $($text)?)
    };
    (DRAWER2 $(, $text:literal)?) => {
        concat!("\u{e95d}", $($text)?)
    };
    (BOX_ADD $(, $text:literal)?) => {
        concat!("\u{e95e}", $($text)?)
    };
    (BOX_REMOVE $(, $text:literal)?) => {
        concat!("\u{e95f}", $($text)?)
    };
    (DOWNLOAD $(, $text:literal)?) => {
        concat!("\u{e960}", $($text)?)
    };
    (UPLOAD $(, $text:literal)?) => {
        concat!("\u{e961}", $($text)?)
    };
    (FLOPPY_DISK $(, $text:literal)?) => {
        concat!("\u{e962}", $($text)?)
    };
    (DRIVE $(, $text:literal)?) => {
        concat!("\u{e963}", $($text)?)
    };
    (DATABASE $(, $text:literal)?) => {
        concat!("\u{e964}", $($text)?)
    };
    (UNDO $(, $text:literal)?) => {
        concat!("\u{e965}", $($text)?)
    };
    (REDO $(, $text:literal)?) => {
        concat!("\u{e966}", $($text)?)
    };
    (UNDO2 $(, $text:literal)?) => {
        concat!("\u{e967}", $($text)?)
    };
    (REDO2 $(, $text:literal)?) => {
        concat!("\u{e968}", $($text)?)
    };
    (FORWARD $(, $text:literal)?) => {
        concat!("\u{e969}", $($text)?)
    };
    (REPLY $(, $text:literal)?) => {
        concat!("\u{e96a}", $($text)?)
    };
    (BUBBLE $(, $text:literal)?) => {
        concat!("\u{e96b}", $($text)?)
    };
    (BUBBLES $(, $text:literal)?) => {
        concat!("\u{e96c}", $($text)?)
    };
    (BUBBLES2 $(, $text:literal)?) => {
        concat!("\u{e96d}", $($text)?)
    };
    (BUBBLE2 $(, $text:literal)?) => {
        concat!("\u{e96e}", $($text)?)
    };
    (BUBBLES3 $(, $text:literal)?) => {
        concat!("\u{e96f}", $($text)?)
    };
    (BUBBLES4 $(, $text:literal)?) => {
        concat!("\u{e970}", $($text)?)
    };
    (USER $(, $text:literal)?) => {
        concat!("\u{e971}", $($text)?)
    };
    (USERS $(, $text:literal)?) => {
        concat!("\u{e972}", $($text)?)
    };
    (USER_PLUS $(, $text:literal)?) => {
        concat!("\u{e973}", $($text)?)
    };
    (USER_MINUS $(, $text:literal)?) => {
        concat!("\u{e974}", $($text)?)
    };
    (USER_CHECK $(, $text:literal)?) => {
        concat!("\u{e975}", $($text)?)
    };
    (USER_TIE $(, $text:literal)?) => {
        concat!("\u{e976}", $($text)?)
    };
    (QUOTES_LEFT $(, $text:literal)?) => {
        concat!("\u{e977}", $($text)?)
    };
    (QUOTES_RIGHT $(, $text:literal)?) => {
        concat!("\u{e978}", $($text)?)
    };
    (HOUR_GLASS $(, $text:literal)?) => {
        concat!("\u{e979}", $($text)?)
    };
    (SPINNER $(, $text:literal)?) => {
        concat!("\u{e97a}", $($text)?)
    };
    (SPINNER2 $(, $text:literal)?) => {
        concat!("\u{e97b}", $($text)?)
    };
    (SPINNER3 $(, $text:literal)?) => {
        concat!("\u{e97c}", $($text)?)
    };
    (SPINNER4 $(, $text:literal)?) => {
        concat!("\u{e97d}", $($text)?)
    };
    (SPINNER5 $(, $text:literal)?) => {
        concat!("\u{e97e}", $($text)?)
    };
    (SPINNER6 $(, $text:literal)?) => {
        concat!("\u{e97f}", $($text)?)
    };
    (SPINNER7 $(, $text:literal)?) => {
        concat!("\u{e980}", $($text)?)
    };
    (SPINNER8 $(, $text:literal)?) => {
        concat!("\u{e981}", $($text)?)
    };
    (SPINNER9 $(, $text:literal)?) => {
        concat!("\u{e982}", $($text)?)
    };
    (SPINNER10 $(, $text:literal)?) => {
        concat!("\u{e983}", $($text)?)
    };
    (SPINNER11 $(, $text:literal)?) => {
        concat!("\u{e984}", $($text)?)
    };
    (BINOCULARS $(, $text:literal)?) => {
        concat!("\u{e985}", $($text)?)
    };
    (SEARCH $(, $text:literal)?) => {
        concat!("\u{e986}", $($text)?)
    };
    (ZOOM_IN $(, $text:literal)?) => {
        concat!("\u{e987}", $($text)?)
    };
    (ZOOM_OUT $(, $text:literal)?) => {
        concat!("\u{e988}", $($text)?)
    };
    (ENLARGE $(, $text:literal)?) => {
        concat!("\u{e989}", $($text)?)
    };
    (SHRINK $(, $text:literal)?) => {
        concat!("\u{e98a}", $($text)?)
    };
    (ENLARGE2 $(, $text:literal)?) => {
        concat!("\u{e98b}", $($text)?)
    };
    (SHRINK2 $(, $text:literal)?) => {
        concat!("\u{e98c}", $($text)?)
    };
    (KEY $(, $text:literal)?) => {
        concat!("\u{e98d}", $($text)?)
    };
    (KEY2 $(, $text:literal)?) => {
        concat!("\u{e98e}", $($text)?)
    };
    (LOCK $(, $text:literal)?) => {
        concat!("\u{e98f}", $($text)?)
    };
    (UNLOCKED $(, $text:literal)?) => {
        concat!("\u{e990}", $($text)?)
    };
    (WRENCH $(, $text:literal)?) => {
        concat!("\u{e991}", $($text)?)
    };
    (EQUALIZER $(, $text:literal)?) => {
        concat!("\u{e992}", $($text)?)
    };
    (EQUALIZER2 $(, $text:literal)?) => {
        concat!("\u{e993}", $($text)?)
    };
    (COG $(, $text:literal)?) => {
        concat!("\u{e994}", $($text)?)
    };
    (COGS $(, $text:literal)?) => {
        concat!("\u{e995}", $($text)?)
    };
    (HAMMER $(, $text:literal)?) => {
        concat!("\u{e996}", $($text)?)
    };
    (MAGIC_WAND $(, $text:literal)?) => {
        concat!("\u{e997}", $($text)?)
    };
    (AID_KIT $(, $text:literal)?) => {
        concat!("\u{e998}", $($text)?)
    };
    (BUG $(, $text:literal)?) => {
        concat!("\u{e999}", $($text)?)
    };
    (PIE_CHART $(, $text:literal)?) => {
        concat!("\u{e99a}", $($text)?)
    };
    (STATS_DOTS $(, $text:literal)?) => {
        concat!("\u{e99b}", $($text)?)
    };
    (STATS_BARS $(, $text:literal)?) => {
        concat!("\u{e99c}", $($text)?)
    };
    (STATS_BARS2 $(, $text:literal)?) => {
        concat!("\u{e99d}", $($text)?)
    };
    (TROPHY $(, $text:literal)?) => {
        concat!("\u{e99e}", $($text)?)
    };
    (GIFT $(, $text:literal)?) => {
        concat!("\u{e99f}", $($text)?)
    };
    (GLASS $(, $text:literal)?) => {
        concat!("\u{e9a0}", $($text)?)
    };
    (GLASS2 $(, $text:literal)?) => {
        concat!("\u{e9a1}", $($text)?)
    };
    (MUG $(, $text:literal)?) => {
        concat!("\u{e9a2}", $($text)?)
    };
    (SPOON_KNIFE $(, $text:literal)?) => {
        concat!("\u{e9a3}", $($text)?)
    };
    (LEAF $(, $text:literal)?) => {
        concat!("\u{e9a4}", $($text)?)
    };
    (ROCKET $(, $text:literal)?) => {
        concat!("\u{e9a5}", $($text)?)
    };
    (METER $(, $text:literal)?) => {
        concat!("\u{e9a6}", $($text)?)
    };
    (METER2 $(, $text:literal)?) => {
        concat!("\u{e9a7}", $($text)?)
    };
    (HAMMER2 $(, $text:literal)?) => {
        concat!("\u{e9a8}", $($text)?)
    };
    (FIRE $(, $text:literal)?) => {
        concat!("\u{e9a9}", $($text)?)
    };
    (LAB $(, $text:literal)?) => {
        concat!("\u{e9aa}", $($text)?)
    };
    (MAGNET $(, $text:literal)?) => {
        concat!("\u{e9ab}", $($text)?)
    };
    (BIN $(, $text:literal)?) => {
        concat!("\u{e9ac}", $($text)?)
    };
    (BIN2 $(, $text:literal)?) => {
        concat!("\u{e9ad}", $($text)?)
    };
    (BRIEFCASE $(, $text:literal)?) => {
        concat!("\u{e9ae}", $($text)?)
    };
    (AIRPLANE $(, $text:literal)?) => {
        concat!("\u{e9af}", $($text)?)
    };
    (TRUCK $(, $text:literal)?) => {
        concat!("\u{e9b0}", $($text)?)
    };
    (ROAD $(, $text:literal)?) => {
        concat!("\u{e9b1}", $($text)?)
    };
    (ACCESSIBILITY $(, $text:literal)?) => {
        concat!("\u{e9b2}", $($text)?)
    };
    (TARGET $(, $text:literal)?) => {
        concat!("\u{e9b3}", $($text)?)
    };
    (SHIELD $(, $text:literal)?) => {
        concat!("\u{e9b4}", $($text)?)
    };
    (POWER $(, $text:literal)?) => {
        concat!("\u{e9b5}", $($text)?)
    };
    (SWITCH $(, $text:literal)?) => {
        concat!("\u{e9b6}", $($text)?)
    };
    (POWER_CORD $(, $text:literal)?) => {
        concat!("\u{e9b7}", $($text)?)
    };
    (CLIPBOARD $(, $text:literal)?) => {
        concat!("\u{e9b8}", $($text)?)
    };
    (LIST_NUMBERED $(, $text:literal)?) => {
        concat!("\u{e9b9}", $($text)?)
    };
    (LIST $(, $text:literal)?) => {
        concat!("\u{e9ba}", $($text)?)
    };
    (LIST2 $(, $text:literal)?) => {
        concat!("\u{e9bb}", $($text)?)
    };
    (TREE $(, $text:literal)?) => {
        concat!("\u{e9bc}", $($text)?)
    };
    (MENU $(, $text:literal)?) => {
        concat!("\u{e9bd}", $($text)?)
    };
    (MENU2 $(, $text:literal)?) => {
        concat!("\u{e9be}", $($text)?)
    };
    (MENU3 $(, $text:literal)?) => {
        concat!("\u{e9bf}", $($text)?)
    };
    (MENU4 $(, $text:literal)?) => {
        concat!("\u{e9c0}", $($text)?)
    };
    (CLOUD $(, $text:literal)?) => {
        concat!("\u{e9c1}", $($text)?)
    };
    (CLOUD_DOWNLOAD $(, $text:literal)?) => {
        concat!("\u{e9c2}", $($text)?)
    };
    (CLOUD_UPLOAD $(, $text:literal)?) => {
        concat!("\u{e9c3}", $($text)?)
    };
    (CLOUD_CHECK $(, $text:literal)?) => {
        concat!("\u{e9c4}", $($text)?)
    };
    (DOWNLOAD2 $(, $text:literal)?) => {
        concat!("\u{e9c5}", $($text)?)
    };
    (UPLOAD2 $(, $text:literal)?) => {
        concat!("\u{e9c6}", $($text)?)
    };
    (DOWNLOAD3 $(, $text:literal)?) => {
        concat!("\u{e9c7}", $($text)?)
    };
    (UPLOAD3 $(, $text:literal)?) => {
        concat!("\u{e9c8}", $($text)?)
    };
    (SPHERE $(, $text:literal)?) => {
        concat!("\u{e9c9}", $($text)?)
    };
    (EARTH $(, $text:literal)?) => {
        concat!("\u{e9ca}", $($text)?)
    };
    (LINK $(, $text:literal)?) => {
        concat!("\u{e9cb}", $($text)?)
    };
    (FLAG $(, $text:literal)?) => {
        concat!("\u{e9cc}", $($text)?)
    };
    (ATTACHMENT $(, $text:literal)?) => {
        concat!("\u{e9cd}", $($text)?)
    };
    (EYE $(, $text:literal)?) => {
        concat!("\u{e9ce}", $($text)?)
    };
    (EYE_PLUS $(, $text:literal)?) => {
        concat!("\u{e9cf}", $($text)?)
    };
    (EYE_MINUS $(, $text:literal)?) => {
        concat!("\u{e9d0}", $($text)?)
    };
    (EYE_BLOCKED $(, $text:literal)?) => {
        concat!("\u{e9d1}", $($text)?)
    };
    (BOOKMARK $(, $text:literal)?) => {
        concat!("\u{e9d2}", $($text)?)
    };
    (BOOKMARKS $(, $text:literal)?) => {
        concat!("\u{e9d3}", $($text)?)
    };
    (SUN $(, $text:literal)?) => {
        concat!("\u{e9d4}", $($text)?)
    };
    (CONTRAST $(, $text:literal)?) => {
        concat!("\u{e9d5}", $($text)?)
    };
    (BRIGHTNESS_CONTRAST $(, $text:literal)?) => {
        concat!("\u{e9d6}", $($text)?)
    };
    (STAR_EMPTY $(, $text:literal)?) => {
        concat!("\u{e9d7}", $($text)?)
    };
    (STAR_HALF $(, $text:literal)?) => {
        concat!("\u{e9d8}", $($text)?)
    };
    (STAR_FULL $(, $text:literal)?) => {
        concat!("\u{e9d9}", $($text)?)
    };
    (HEART $(, $text:literal)?) => {
        concat!("\u{e9da}", $($text)?)
    };
    (HEART_BROKEN $(, $text:literal)?) => {
        concat!("\u{e9db}", $($text)?)
    };
    (MAN $(, $text:literal)?) => {
        concat!("\u{e9dc}", $($text)?)
    };
    (WOMAN $(, $text:literal)?) => {
        concat!("\u{e9dd}", $($text)?)
    };
    (MAN_WOMAN $(, $text:literal)?) => {
        concat!("\u{e9de}", $($text)?)
    };
    (HAPPY $(, $text:literal)?) => {
        concat!("\u{e9df}", $($text)?)
    };
    (HAPPY2 $(, $text:literal)?) => {
        concat!("\u{e9e0}", $($text)?)
    };
    (SMILE $(, $text:literal)?) => {
        concat!("\u{e9e1}", $($text)?)
    };
    (SMILE2 $(, $text:literal)?) => {
        concat!("\u{e9e2}", $($text)?)
    };
    (TONGUE $(, $text:literal)?) => {
        concat!("\u{e9e3}", $($text)?)
    };
    (TONGUE2 $(, $text:literal)?) => {
        concat!("\u{e9e4}", $($text)?)
    };
    (SAD $(, $text:literal)?) => {
        concat!("\u{e9e5}", $($text)?)
    };
    (SAD2 $(, $text:literal)?) => {
        concat!("\u{e9e6}", $($text)?)
    };
    (WINK $(, $text:literal)?) => {
        concat!("\u{e9e7}", $($text)?)
    };
    (WINK2 $(, $text:literal)?) => {
        concat!("\u{e9e8}", $($text)?)
    };
    (GRIN $(, $text:literal)?) => {
        concat!("\u{e9e9}", $($text)?)
    };
    (GRIN2 $(, $text:literal)?) => {
        concat!("\u{e9ea}", $($text)?)
    };
    (COOL $(, $text:literal)?) => {
        concat!("\u{e9eb}", $($text)?)
    };
    (COOL2 $(, $text:literal)?) => {
        concat!("\u{e9ec}", $($text)?)
    };
    (ANGRY $(, $text:literal)?) => {
        concat!("\u{e9ed}", $($text)?)
    };
    (ANGRY2 $(, $text:literal)?) => {
        concat!("\u{e9ee}", $($text)?)
    };
    (EVIL $(, $text:literal)?) => {
        concat!("\u{e9ef}", $($text)?)
    };
    (EVIL2 $(, $text:literal)?) => {
        concat!("\u{e9f0}", $($text)?)
    };
    (SHOCKED $(, $text:literal)?) => {
        concat!("\u{e9f1}", $($text)?)
    };
    (SHOCKED2 $(, $text:literal)?) => {
        concat!("\u{e9f2}", $($text)?)
    };
    (BAFFLED $(, $text:literal)?) => {
        concat!("\u{e9f3}", $($text)?)
    };
    (BAFFLED2 $(, $text:literal)?) => {
        concat!("\u{e9f4}", $($text)?)
    };
    (CONFUSED $(, $text:literal)?) => {
        concat!("\u{e9f5}", $($text)?)
    };
    (CONFUSED2 $(, $text:literal)?) => {
        concat!("\u{e9f6}", $($text)?)
    };
    (NEUTRAL $(, $text:literal)?) => {
        concat!("\u{e9f7}", $($text)?)
    };
    (NEUTRAL2 $(, $text:literal)?) => {
        concat!("\u{e9f8}", $($text)?)
    };
    (HIPSTER $(, $text:literal)?) => {
        concat!("\u{e9f9}", $($text)?)
    };
    (HIPSTER2 $(, $text:literal)?) => {
        concat!("\u{e9fa}", $($text)?)
    };
    (WONDERING $(, $text:literal)?) => {
        concat!("\u{e9fb}", $($text)?)
    };
    (WONDERING2 $(, $text:literal)?) => {
        concat!("\u{e9fc}", $($text)?)
    };
    (SLEEPY $(, $text:literal)?) => {
        concat!("\u{e9fd}", $($text)?)
    };
    (SLEEPY2 $(, $text:literal)?) => {
        concat!("\u{e9fe}", $($text)?)
    };
    (FRUSTRATED $(, $text:literal)?) => {
        concat!("\u{e9ff}", $($text)?)
    };
    (FRUSTRATED2 $(, $text:literal)?) => {
        concat!("\u{ea00}", $($text)?)
    };
    (CRYING $(, $text:literal)?) => {
        concat!("\u{ea01}", $($text)?)
    };
    (CRYING2 $(, $text:literal)?) => {
        concat!("\u{ea02}", $($text)?)
    };
    (POINT_UP $(, $text:literal)?) => {
        concat!("\u{ea03}", $($text)?)
    };
    (POINT_RIGHT $(, $text:literal)?) => {
        concat!("\u{ea04}", $($text)?)
    };
    (POINT_DOWN $(, $text:literal)?) => {
        concat!("\u{ea05}", $($text)?)
    };
    (POINT_LEFT $(, $text:literal)?) => {
        concat!("\u{ea06}", $($text)?)
    };
    (WARNING $(, $text:literal)?) => {
        concat!("\u{ea07}", $($text)?)
    };
    (NOTIFICATION $(, $text:literal)?) => {
        concat!("\u{ea08}", $($text)?)
    };
    (QUESTION $(, $text:literal)?) => {
        concat!("\u{ea09}", $($text)?)
    };
    (PLUS $(, $text:literal)?) => {
        concat!("\u{ea0a}", $($text)?)
    };
    (MINUS $(, $text:literal)?) => {
        concat!("\u{ea0b}", $($text)?)
    };
    (INFO $(, $text:literal)?) => {
        concat!("\u{ea0c}", $($text)?)
    };
    (CANCEL_CIRCLE $(, $text:literal)?) => {
        concat!("\u{ea0d}", $($text)?)
    };
    (BLOCKED $(, $text:literal)?) => {
        concat!("\u{ea0e}", $($text)?)
    };
    (CROSS $(, $text:literal)?) => {
        concat!("\u{ea0f}", $($text)?)
    };
    (CHECKMARK $(, $text:literal)?) => {
        concat!("\u{ea10}", $($text)?)
    };
    (CHECKMARK2 $(, $text:literal)?) => {
        concat!("\u{ea11}", $($text)?)
    };
    (SPELL_CHECK $(, $text:literal)?) => {
        concat!("\u{ea12}", $($text)?)
    };
    (ENTER $(, $text:literal)?) => {
        concat!("\u{ea13}", $($text)?)
    };
    (EXIT $(, $text:literal)?) => {
        concat!("\u{ea14}", $($text)?)
    };
    (PLAY2 $(, $text:literal)?) => {
        concat!("\u{ea15}", $($text)?)
    };
    (PAUSE $(, $text:literal)?) => {
        concat!("\u{ea16}", $($text)?)
    };
    (STOP $(, $text:literal)?) => {
        concat!("\u{ea17}", $($text)?)
    };
    (PREVIOUS $(, $text:literal)?) => {
        concat!("\u{ea18}", $($text)?)
    };
    (NEXT $(, $text:literal)?) => {
        concat!("\u{ea19}", $($text)?)
    };
    (BACKWARD $(, $text:literal)?) => {
        concat!("\u{ea1a}", $($text)?)
    };
    (FORWARD2 $(, $text:literal)?) => {
        concat!("\u{ea1b}", $($text)?)
    };
    (PLAY3 $(, $text:literal)?) => {
        concat!("\u{ea1c}", $($text)?)
    };
    (PAUSE2 $(, $text:literal)?) => {
        concat!("\u{ea1d}", $($text)?)
    };
    (STOP2 $(, $text:literal)?) => {
        concat!("\u{ea1e}", $($text)?)
    };
    (BACKWARD2 $(, $text:literal)?) => {
        concat!("\u{ea1f}", $($text)?)
    };
    (FORWARD3 $(, $text:literal)?) => {
        concat!("\u{ea20}", $($text)?)
    };
    (FIRST $(, $text:literal)?) => {
        concat!("\u{ea21}", $($text)?)
    };
    (LAST $(, $text:literal)?) => {
        concat!("\u{ea22}", $($text)?)
    };
    (PREVIOUS2 $(, $text:literal)?) => {
        concat!("\u{ea23}", $($text)?)
    };
    (NEXT2 $(, $text:literal)?) => {
        concat!("\u{ea24}", $($text)?)
    };
    (EJECT $(, $text:literal)?) => {
        concat!("\u{ea25}", $($text)?)
    };
    (VOLUME_HIGH $(, $text:literal)?) => {
        concat!("\u{ea26}", $($text)?)
    };
    (VOLUME_MEDIUM $(, $text:literal)?) => {
        concat!("\u{ea27}", $($text)?)
    };
    (VOLUME_LOW $(, $text:literal)?) => {
        concat!("\u{ea28}", $($text)?)
    };
    (VOLUME_MUTE $(, $text:literal)?) => {
        concat!("\u{ea29}", $($text)?)
    };
    (VOLUME_MUTE2 $(, $text:literal)?) => {
        concat!("\u{ea2a}", $($text)?)
    };
    (VOLUME_INCREASE $(, $text:literal)?) => {
        concat!("\u{ea2b}", $($text)?)
    };
    (VOLUME_DECREASE $(, $text:literal)?) => {
        concat!("\u{ea2c}", $($text)?)
    };
    (LOOP $(, $text:literal)?) => {
        concat!("\u{ea2d}", $($text)?)
    };
    (LOOP2 $(, $text:literal)?) => {
        concat!("\u{ea2e}", $($text)?)
    };
    (INFINITE $(, $text:literal)?) => {
        concat!("\u{ea2f}", $($text)?)
    };
    (SHUFFLE $(, $text:literal)?) => {
        concat!("\u{ea30}", $($text)?)
    };
    (ARROW_UP_LEFT $(, $text:literal)?) => {
        concat!("\u{ea31}", $($text)?)
    };
    (ARROW_UP $(, $text:literal)?) => {
        concat!("\u{ea32}", $($text)?)
    };
    (ARROW_UP_RIGHT $(, $text:literal)?) => {
        concat!("\u{ea33}", $($text)?)
    };
    (ARROW_RIGHT $(, $text:literal)?) => {
        concat!("\u{ea34}", $($text)?)
    };
    (ARROW_DOWN_RIGHT $(, $text:literal)?) => {
        concat!("\u{ea35}", $($text)?)
    };
    (ARROW_DOWN $(, $text:literal)?) => {
        concat!("\u{ea36}", $($text)?)
    };
    (ARROW_DOWN_LEFT $(, $text:literal)?) => {
        concat!("\u{ea37}", $($text)?)
    };
    (ARROW_LEFT $(, $text:literal)?) => {
        concat!("\u{ea38}", $($text)?)
    };
    (ARROW_UP_LEFT2 $(, $text:literal)?) => {
        concat!("\u{ea39}", $($text)?)
    };
    (ARROW_UP2 $(, $text:literal)?) => {
        concat!("\u{ea3a}", $($text)?)
    };
    (ARROW_UP_RIGHT2 $(, $text:literal)?) => {
        concat!("\u{ea3b}", $($text)?)
    };
    (ARROW_RIGHT2 $(, $text:literal)?) => {
        concat!("\u{ea3c}", $($text)?)
    };
    (ARROW_DOWN_RIGHT2 $(, $text:literal)?) => {
        concat!("\u{ea3d}", $($text)?)
    };
    (ARROW_DOWN2 $(, $text:literal)?) => {
        concat!("\u{ea3e}", $($text)?)
    };
    (ARROW_DOWN_LEFT2 $(, $text:literal)?) => {
        concat!("\u{ea3f}", $($text)?)
    };
    (ARROW_LEFT2 $(, $text:literal)?) => {
        concat!("\u{ea40}", $($text)?)
    };
    (CIRCLE_UP $(, $text:literal)?) => {
        concat!("\u{ea41}", $($text)?)
    };
    (CIRCLE_RIGHT $(, $text:literal)?) => {
        concat!("\u{ea42}", $($text)?)
    };
    (CIRCLE_DOWN $(, $text:literal)?) => {
        concat!("\u{ea43}", $($text)?)
    };
    (CIRCLE_LEFT $(, $text:literal)?) => {
        concat!("\u{ea44}", $($text)?)
    };
    (TAB $(, $text:literal)?) => {
        concat!("\u{ea45}", $($text)?)
    };
    (MOVE_UP $(, $text:literal)?) => {
        concat!("\u{ea46}", $($text)?)
    };
    (MOVE_DOWN $(, $text:literal)?) => {
        concat!("\u{ea47}", $($text)?)
    };
    (SORT_ALPHA_ASC $(, $text:literal)?) => {
        concat!("\u{ea48}", $($text)?)
    };
    (SORT_ALPHA_DESC $(, $text:literal)?) => {
        concat!("\u{ea49}", $($text)?)
    };
    (SORT_NUMERIC_ASC $(, $text:literal)?) => {
        concat!("\u{ea4a}", $($text)?)
    };
    (SORT_NUMBERIC_DESC $(, $text:literal)?) => {
        concat!("\u{ea4b}", $($text)?)
    };
    (SORT_AMOUNT_ASC $(, $text:literal)?) => {
        concat!("\u{ea4c}", $($text)?)
    };
    (SORT_AMOUNT_DESC $(, $text:literal)?) => {
        concat!("\u{ea4d}", $($text)?)
    };
    (COMMAND $(, $text:literal)?) => {
        concat!("\u{ea4e}", $($text)?)
    };
    (SHIFT $(, $text:literal)?) => {
        concat!("\u{ea4f}", $($text)?)
    };
    (CTRL $(, $text:literal)?) => {
        concat!("\u{ea50}", $($text)?)
    };
    (OPT $(, $text:literal)?) => {
        concat!("\u{ea51}", $($text)?)
    };
    (CHECKBOX_CHECKED $(, $text:literal)?) => {
        concat!("\u{ea52}", $($text)?)
    };
    (CHECKBOX_UNCHECKED $(, $text:literal)?) => {
        concat!("\u{ea53}", $($text)?)
    };
    (RADIO_CHECKED $(, $text:literal)?) => {
        concat!("\u{ea54}", $($text)?)
    };
    (RADIO_CHECKED2 $(, $text:literal)?) => {
        concat!("\u{ea55}", $($text)?)
    };
    (RADIO_UNCHECKED $(, $text:literal)?) => {
        concat!("\u{ea56}", $($text)?)
    };
    (CROP $(, $text:literal)?) => {
        concat!("\u{ea57}", $($text)?)
    };
    (MAKE_GROUP $(, $text:literal)?) => {
        concat!("\u{ea58}", $($text)?)
    };
    (UNGROUP $(, $text:literal)?) => {
        concat!("\u{ea59}", $($text)?)
    };
    (SCISSORS $(, $text:literal)?) => {
        concat!("\u{ea5a}", $($text)?)
    };
    (FILTER $(, $text:literal)?) => {
        concat!("\u{ea5b}", $($text)?)
    };
    (FONT $(, $text:literal)?) => {
        concat!("\u{ea5c}", $($text)?)
    };
    (LIGATURE $(, $text:literal)?) => {
        concat!("\u{ea5d}", $($text)?)
    };
    (LIGATURE2 $(, $text:literal)?) => {
        concat!("\u{ea5e}", $($text)?)
    };
    (TEXT_HEIGHT $(, $text:literal)?) => {
        concat!("\u{ea5f}", $($text)?)
    };
    (TEXT_WIDTH $(, $text:literal)?) => {
        concat!("\u{ea60}", $($text)?)
    };
    (FONT_SIZE $(, $text:literal)?) => {
        concat!("\u{ea61}", $($text)?)
    };
    (BOLD $(, $text:literal)?) => {
        concat!("\u{ea62}", $($text)?)
    };
    (UNDERLINE $(, $text:literal)?) => {
        concat!("\u{ea63}", $($text)?)
    };
    (ITALIC $(, $text:literal)?) => {
        concat!("\u{ea64}", $($text)?)
    };
    (STRIKETHROUGH $(, $text:literal)?) => {
        concat!("\u{ea65}", $($text)?)
    };
    (OMEGA $(, $text:literal)?) => {
        concat!("\u{ea66}", $($text)?)
    };
    (SIGMA $(, $text:literal)?) => {
        concat!("\u{ea67}", $($text)?)
    };
    (PAGE_BREAK $(, $text:literal)?) => {
        concat!("\u{ea68}", $($text)?)
    };
    (SUPERSCRIPT $(, $text:literal)?) => {
        concat!("\u{ea69}", $($text)?)
    };
    (SUBSCRIPT $(, $text:literal)?) => {
        concat!("\u{ea6a}", $($text)?)
    };
    (SUPERSCRIPT2 $(, $text:literal)?) => {
        concat!("\u{ea6b}", $($text)?)
    };
    (SUBSCRIPT2 $(, $text:literal)?) => {
        concat!("\u{ea6c}", $($text)?)
    };
    (TEXT_COLOR $(, $text:literal)?) => {
        concat!("\u{ea6d}", $($text)?)
    };
    (PAGEBREAK $(, $text:literal)?) => {
        concat!("\u{ea6e}", $($text)?)
    };
    (CLEAR_FORMATTING $(, $text:literal)?) => {
        concat!("\u{ea6f}", $($text)?)
    };
    (TABLE $(, $text:literal)?) => {
        concat!("\u{ea70}", $($text)?)
    };
    (TABLE2 $(, $text:literal)?) => {
        concat!("\u{ea71}", $($text)?)
    };
    (INSERT_TEMPLATE $(, $text:literal)?) => {
        concat!("\u{ea72}", $($text)?)
    };
    (PILCROW $(, $text:literal)?) => {
        concat!("\u{ea73}", $($text)?)
    };
    (LTR $(, $text:literal)?) => {
        concat!("\u{ea74}", $($text)?)
    };
    (RTL $(, $text:literal)?) => {
        concat!("\u{ea75}", $($text)?)
    };
    (SECTION $(, $text:literal)?) => {
        concat!("\u{ea76}", $($text)?)
    };
    (PARAGRAPH_LEFT $(, $text:literal)?) => {
        concat!("\u{ea77}", $($text)?)
    };
    (PARAGRAPH_CENTER $(, $text:literal)?) => {
        concat!("\u{ea78}", $($text)?)
    };
    (PARAGRAPH_RIGHT $(, $text:literal)?) => {
        concat!("\u{ea79}", $($text)?)
    };
    (PARAGRAPH_JUSTIFY $(, $text:literal)?) => {
        concat!("\u{ea7a}", $($text)?)
    };
    (INDENT_INCREASE $(, $text:literal)?) => {
        concat!("\u{ea7b}", $($text)?)
    };
    (INDENT_DECREASE $(, $text:literal)?) => {
        concat!("\u{ea7c}", $($text)?)
    };
    (SHARE $(, $text:literal)?) => {
        concat!("\u{ea7d}", $($text)?)
    };
    (NEW_TAB $(, $text:literal)?) => {
        concat!("\u{ea7e}", $($text)?)
    };
    (EMBED $(, $text:literal)?) => {
        concat!("\u{ea7f}", $($text)?)
    };
    (EMBED2 $(, $text:literal)?) => {
        concat!("\u{ea80}", $($text)?)
    };
    (TERMINAL $(, $text:literal)?) => {
        concat!("\u{ea81}", $($text)?)
    };
}
